<?php


namespace app\model;


use tpScriptVueCurd\base\model\BaseChildModel;
use tpScriptVueCurd\field\EditorField;
use tpScriptVueCurd\field\RadioField;
use tpScriptVueCurd\field\StringField;
use tpScriptVueCurd\FieldCollection;

class Pets extends BaseChildModel
{

    public static function getControllerClass(): string
    {
        return \app\controller\Pets::class;
    }


    public function fields(): FieldCollection
    {
        return new FieldCollection([
            StringField::init('nickname', '昵称')
                ->listShow(true)
                ->required(true),
            RadioField::init('type', '类型')->items(['猫','狗'])
                ->listShow(true)
                ->required(true),
            EditorField::init('test','测试')
        ]);
    }


}